﻿#region << 文件说明 >>

/*----------------------------------------------------------------
 * 命名空间：Vampirewal.Core.Attributes
 * 唯一标识：dff181e1-74b4-4d1a-a4d7-99169eaf3455
 * 文件名：HeaderAttribute
 *
 * 创建者：杨程
 * 电子邮箱：235160615@qq.com
 * 创建时间：2023/10/30 10:52:38
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/

#endregion << 文件说明 >>

namespace Vampirewal.Core.Attributes;

/// <summary>
/// 自定义实体选择器类特性
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class CustomSelectorEntityAttribute : Attribute
{
    public CustomSelectorEntityAttribute(string title,params string[] ignorePropertyName)
    {
        Title = title;
        CustomSelectorIgnorePropertyName = ignorePropertyName;
    }

    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; }

    /// <summary>
    /// 自定义实体选择器忽略的属性名称
    /// </summary>
    public string[] CustomSelectorIgnorePropertyName { get; }

    /// <summary>
    /// 选择按钮的样式键值
    /// </summary>
    public string SelectButtonStyleKey { get; set; }
}


/// <summary>
/// 自定义实体选择器属性特性
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CustomSelectorPropertyAttribute : Attribute
{
    public CustomSelectorPropertyAttribute(string header)
    {
        Header = header;
        
    }

    /// <summary>
    /// 标题
    /// </summary>
    public string Header { get; }

    /// <summary>
    /// 转换器名称
    /// </summary>
    public string ConverterName { get; set; }

    /// <summary>
    /// 宽度(小于50就不设置宽度了)
    /// </summary>
    public double Width { get; set; } = 100d;
}

